<!DOCTYPE html>
<html lang="en">
	<head>
		<title>米迪</title>
		<meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<link rel="stylesheet" href="__Admin__/css/bootstrap.min.css" />
		<link rel="stylesheet" href="__Admin__/css/bootstrap-responsive.min.css" />
		<link rel="stylesheet" href="__Admin__/css/uniform.css" />
		<link rel="stylesheet" href="__Admin__/css/select2.css" />		
		<link rel="stylesheet" href="__Admin__/css/unicorn.main.css" />
		<link rel="stylesheet" href="__Admin__/css/unicorn.grey.css" class="skin-color" />	
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head>
	<body>
		
	 <include file="Public/head" />
		<div id="content">
			<div id="content-header">
				<h1>管理员管理</h1>
			</div>
			<div id="breadcrumb">
				<a href="{:U('index/index')}">管理员列表</a>
				<a href="" class="current">管理员修改</a>
			</div>
			<div class="container-fluid">
				<div class="row-fluid">
					<div class="span12">
						<div class="widget-box">
							<div class="widget-title">
								<span class="icon">
									<i class="icon-align-justify"></i>									
								</span>
								<h5>管理员修改</h5>
							</div>
							<div class="widget-content nopadding">
								<form class="form-horizontal" method="post" action="" name="basic_validate" id="basic_validate"  />
                                    <div class="control-group">
									        <input type="hidden" value="{$result['id']}"/>
                                        <label class="control-label">用户名：</label>
                                        <div class="controls">
                                            <input type="text" name="username" id="username" readonly="readonly" value="{$result['username']}"/>
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label">密码：</label>
                                        <div class="controls">
                                            <input type="password" name="password" id="password" />
                                        </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label">确定密码：</label>
                                        <div class="controls">
                                            <input type="password" name="password1" id="password1" />
                                        </div>
                                    </div>
                                   
                                    <div class="form-actions">
                                        <input type="submit" value="提交" class="btn btn-primary" />
                                    </div>
                                </form>
							</div>
						</div>			
					</div>
				</div>		
					</div>
				</div>
				<include file="Public/foot" />
			</div>
		</div>
		
		
            
            <script src="__Admin__/js/jquery.min.js"></script>
            <script src="__Admin__/js/jquery.ui.custom.js"></script>
            <script src="__Admin__/js/bootstrap.min.js"></script>
            <script src="__Admin__/js/jquery.uniform.js"></script>
            <script src="__Admin__/js/select2.min.js"></script>
            <script src="__Admin__/js/jquery.validate.js"></script>
            <script src="__Admin__/js/unicorn.js"></script>
			<script>
	$(function(){
	            jQuery.validator.addMethod("chrnum", function(value, element) {
					var chrnum = /^([a-zA-Z0-9]+)$/;
					return this.optional(element) || (chrnum.test(value));
					}, "只能输入数字和字母(字符A-Z, a-z, 0-9)");

				$("#basic_validate").validate({
							rules:{
								password:{
								    required:true,
									maxlength:16,
									minlength:6,
									chrnum : true
								},
								password1:{
								    required:true,
									equalTo:"#password",
									maxlength:16,
									minlength:6,
									chrnum : true
								}
							},
						    messages:{
								password:{
								    required:"不能为空",
									maxlength:"长度不能大于16位",
									minlength:"长度不能小于6位",
									chrnum:"格式只能为数字和字母"
								},
								password1:{
								    required:"不能为空",
									equalTo:"两次密码不一致",
									maxlength:"长度不能大于16位",
									minlength:"长度不能小于6位",
									chrnum:"格式只能为数字和字母"
								}
							  },
							errorClass: "help-inline",
							errorElement: "span",
							highlight:function(element, errorClass, validClass) {
								$(element).parents('.control-group').addClass('error');
							},
							unhighlight: function(element, errorClass, validClass) {
								$(element).parents('.control-group').removeClass('error');
								$(element).parents('.control-group').addClass('success');
							}
						})
					} )
			</script>
	</body>
</html>
